<template>
  <div class="homePage" :style="{height:winheight+'px'}">
    <img src="/static/images/hometitle.png" alt="" class="hometitle">
  </div>
</template>
<script>
import router from '../router/index';
export default {
  name: "component_name",
  data () {
    return {
          winheight: window.innerHeight
    };
  },mounted () {
                var qrid = this.$route.params.qrid;
            let that = this;
            console.log(qrid);
            $.ajax({
                url: ' http://vapi.dicbs.cn/user/getblessings',
                type: 'post',
                data: {
                    qrcode: qrid,
                    token: $.md5('#%christma$sco*ntroller')
                },
                success: function(data) {
                    console.log(data)
                    let status = data.data.status;
                    if (status == 1) {
                       localStorage.setItem("qrid",qrid)
                        router.push({
                            path: '/'
                        });
                    } else {
                        router.push({
                            name:'sc',
                            params:{
                                youname:data.data.from_name,
                                toname:data.data.to_name,
                                msg:data.data.blessings
                            }
                        })
                    }
    
                }
            })
  }
}
</script>
<style lang="css" scoped>
</style>